package lj.internal.dict.enums.redis;

/**
 * 电子券用券验证 redis 所有key
 * @author liangxifeng
 * @date 2023/6/27 16:01
 */
public enum EnumUseTicketCheckRedisKeys {
    //已用券列表前缀 key1 = use_ticket_合同号_UUID (HASH) value1 = {券使用码:券批次主键}
    USE_TICKET_PREFIX("use_ticket_"),
    //已用券批次前缀 key2 = use_batch_合同号_UUID(HASH) value2 =  {券批次主键 : 使用张数}
    USE_BATCH_PREFIX("use_batch_"),
    //用券其他数前缀：key3 = batch_other_合同号_UUID (HASH)
    // value = { single_batch_id: 独立使用的券批次主键, limit_value: 满减剩余额度空间)
    BATCH_OTHER_PREFIX("batch_other_"),
    // 全局已用券前缀 global_used_券使用码_合同号_uuid
    GLOBAL_USED_TICKET_PREFIX("global_used_");

    private String key;
    EnumUseTicketCheckRedisKeys(String key) {
        this.key = key;
    }

    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
}
